package com.yxw.yxnet_cd_center.customer_service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yxw.yxnet_cd_center.customer_service.entity.YxCsChannelEntity;
import com.yxw.yxnet_cd_center.customer_service.entity.YxCsFlowRuleEntity;
import com.yxw.yxnet_cd_center.customer_service.vo.UserRuleVo;
import com.yxw.yxnet_cd_center.customer_service.vo.YxCsFlowRuleVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 分流规则管理
 * @author liuxin
 * @date 2023-10-31
 */
@Repository
public interface YxCsFlowRuleMapper extends BaseMapper<YxCsFlowRuleEntity> {

    /**
     * 根据人员id查询规则信息
     * @param userId
     * @return
     */
    List<YxCsFlowRuleVo> getFlowRuleByUserId(@Param("userId") Long userId);

    /**
     * 查询只有唯一人员规则的规则组合
     * @param userIds
     * @return
     */
    List<UserRuleVo> getNoUserRuleByIds(@Param("userIds") List<Long> userIds);
}
